package com.ruoyi.db.pms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.TreeEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 商品分类对象 pms_category
 *
 * @author ruoyi
 * @date 2020-04-22
 */

@ApiModel("商品分类实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class PmsCategory extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("分类编号")
    private Long id;

    @ApiModelProperty("分类名称")
    @Excel(name = "分类名称")
    @NotBlank(message = "分类名称不能为空")
    @Size(min = 0, max = 63, message = "分类名称长度不能超过63个字符")
    private String name;

    @ApiModelProperty("分类关键字，以JSON数组格式")
    @Excel(name = "分类关键字，以JSON数组格式")
    @NotBlank(message = "分类关键字，以JSON数组格式不能为空")
    @Size(min = 0, max = 1023, message = "分类关键字，以JSON数组格式长度不能超过1023个字符")
    private String keywords;

    @ApiModelProperty("分类广告语介绍")
    @Excel(name = "分类广告语介绍")
    @Size(min = 0, max = 255, message = "分类广告语介绍长度不能超过255个字符")
    private String brief;

    @ApiModelProperty("类目图标")
    @Excel(name = "类目图标")
    @Size(min = 0, max = 255, message = "类目图标长度不能超过255个字符")
    private String iconUrl;

    @ApiModelProperty("类目图片")
    @Excel(name = "类目图片")
    @Size(min = 0, max = 255, message = "类目图片长度不能超过255个字符")
    private String picUrl;

    @ApiModelProperty("类目层次")
    @Excel(name = "类目层次")
    @Size(min = 0, max = 255, message = "类目层次长度不能超过255个字符")
    private String level;

    @ApiModelProperty("排序")
    @Excel(name = "排序")
    private Integer sortOrder;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;

}
